package com.tanxi521.afkreward.util;

import com.tanxi521.afkreward.AfkReward;
import com.tanxi521.afkreward.data.AFKRewardMapper;


import java.util.Date;
import java.util.TimerTask;

public class Task extends TimerTask {
    public void run() {
        long time = new Date().getTime();
        AfkReward.getInstance().getServer().broadcastMessage((ConfigUtil.langYml.getString("prefix") + " §b正在准备重置挂机次数限制").replace("&", "§"));
        AFKRewardMapper.updateToday();
        long time1 = new Date().getTime();
        AfkReward.getInstance().getServer().broadcastMessage((ConfigUtil.langYml.getString("prefix") + " §b挂机次数限制重置完成,耗时 §e§l" + (time1 - time) + " §b毫秒").replace("&", "§"));
    }
}
